package org.xxpay.pay.channel.slzfbpay;

import org.xxpay.core.common.util.PayDigestUtil;

import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;


/**
 * 
 *<p>工具类</p>
 * @author  NOT-FIND
 * @version 20/12/07
 */
public class SlzfbUtil {

	public static String getSign(Map<String, Object> param, String signKey){
		SortedMap<String,Object> map = new TreeMap<>(param);
		String str = "";
		for (Map.Entry<String,Object> entry : map.entrySet()){
			if (entry.getValue() == null || "".equals(entry.getValue()) || "sign".equals(entry.getKey()))continue;
			str += entry.getValue();
		}
		return PayDigestUtil.md5(str+signKey,"UTF-8");
	}
	
}
